Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always return 200 for OPTS UTF8 or OPTS UTF-8 ON #596

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

amirzak
Copy link

@amirzak amirzak commented Feb 26, 2023

Fix #266 and #531.
Took inspiration from vsftpd for 200 reply message - https://github.com/dagwieers/vsftpd/blob/ce2fa4288b92683f832c3b5179d5cb2a77d0750e/opts.c#L20

Let me know if additional changes are needed in order to merge it.

@amirzak amirzak changed the title Always 200 for OPTS UTF8 or OPTS UTF-8 ON Always return 200 for OPTS UTF8 or OPTS UTF-8 ON Feb 26, 2023
Comment on lines 3001 to 3002
if arg and ';' not in arg:
raise ValueError('Invalid argument')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this bit should be moved down to just above the facts = [x.lower() for x in arg.split(';')] line?
https://www.rfc-editor.org/rfc/rfc2389#section-4 says command-options = <format specified by individual FTP command> and I think the semicolon in command-options is specific to MLST?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation of raise ValueError seems incorrect

@codecov
Copy link

codecov bot commented Oct 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.72%. Comparing base (4165a47) to head (f3abf96).
Report is 57 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #596      +/-   ##
==========================================
- Coverage   69.81%   69.72%   -0.10%     
==========================================
  Files           9        9              
  Lines        3614     3623       +9     
==========================================
+ Hits         2523     2526       +3     
- Misses       1091     1097       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OPTS UTF8 ON and Windows Explorer FTP client
3 participants